/*
 * @Description: 经典继承
 * @Author: zzj
 * @Date: 2021-09-07 12:13:02
 * @LastEditors: zzj
 * @LastEditTime: 2021-09-07 12:16:57
 */

//经典继承(伪继承)
function Animal(name,age){
    this.name = name;
    this.age = age;
}
function Dog(name,age,color){
    Animal.call(this,name,age);
    this.color = color;
}
var d1 = new Dog("xiaobai",2,"white");
console.log(d1);